查询 Coupon 对象

通过 coupon 对象的 id 查询一个已创建的 coupon 对象。

请求参数描述
APP_ID required string对应 app 对象的 id,该参数仅需要填写在请求地址内,查看 如何获取App ID
USER_ID required stringuser 对象的 id,该参数仅需要填写在请求地址内。
COUPON_ID required stringcoupon 对象的 id,该参数仅需要填写在请求地址内。

返回

返回一个 coupon 对象,或者返回一个错误,详见 错误

定义

GET https://api.pingxx.com/v1/apps/{APP_ID}/users/{USER_ID}/coupons/{COUPON_ID}
待补充
待补充
待补充
待补充
待补充
待补充
待补充

请求示例

curl https://api.pingxx.com/v1/apps/{APP_ID}/users/{USER_ID}/coupons/{COUPON_ID} \
-H "Pingplusplus-Request-Timestamp: 1475029155" \
-H "Pingplusplus-Signature: SIGNATURE" \
-u sk_test_ibbTe5jLGCi5rzfH4OqPW9KC:
待补充
待补充
待补充
待补充
待补充
待补充
待补充

返回示例

{
    "id": "coupon_id",
    "object": "coupon",
    "app": "APP_ID",
    "actual_amount": null,
    "coupon_template": {
        "id": "300116082415452100000700",
        "object": "coupon_template",
        "app": "APP_ID",
        "amount_available": 10000,
        "amount_off": 25,
        "created": 1470904889,
        "expiration": null,
        "livemode": false,
        "max_circulation": 1000,
        "metadata": {
        },
        "name": "25 OFF",
        "percent_off": null,
        "refundable": true,
        "times_circulated": 0,
        "times_redeemed": 0,
        "type": 1
    },
    "created": 1470969003,
    "livemode": false,
    "metadata": {
        "key": "value"
    },
    "order": null,
    "user_times_circulated":1,
    "redeemed": false,
    "time_end": 1472265014,
    "time_start": 1470969003,
    "user": "user_id",
    "valid": true
}